<?php
include("../inc/conn.inc");
include("../inc/page.php");
$hover=2;
$url="list.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
$l_rs=mysql_query("select dj,cat_name,p_num,cat_id from catalog where id=".$_GET['id']);
$l_row=mysql_fetch_array($l_rs);
$j=$l_row[dj];
//城市
$c_rs=mysql_query("select * from city where id=".$_GET['tid']);
$c_row=mysql_fetch_array($c_rs);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$c_row[city_name]?><?=$l_row['cat_name']?>，<?=$c_row[city_name]?><?=$l_row['cat_name']?>列表，<?=$l_row['cat_name']?>产品供应商。</title>
<meta name="description" content="<?=$c_row[city_name]?><?=$l_row['cat_name']?>，<?=$c_row[city_name]?><?=$l_row['cat_name']?>产品列表，<?=$l_row['cat_name']?>供应商专业提供<?=$c_row[city_name]?><?=$l_row['cat_name']?>产品。" />
<meta name="keywords" content="<?=$c_row[city_name]?><?=$l_row['cat_name']?>，<?=$c_row[city_name]?><?=$l_row['cat_name']?>价格,<?=$c_row[city_name]?><?=$l_row['cat_name']?>产品列表，<?=$c_row[city_name]?><?=$l_row['cat_name']?>产品，<?=$c_row[city_name]?><?=$l_row['cat_name']?>工厂<?=$c_row[city_name]?>，<?=$l_row['cat_name']?>公司，<?=$c_row[city_name]?><?=$l_row['cat_name']?>供应商，产品供应，三帝贸易网" />
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/link.css" rel="stylesheet" type="text/css" />
<link href="/css/head_1.css" rel="stylesheet" type="text/css" />
<link href="/Supply/css/list.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/menu_2.php")?>
<div id="mian" class="topside6 side">
<div class="title"><span>共找到<font class="fontred b"><?=$l_row[p_num]?></font>条符合 <font class="fontred"><?=$l_row['cat_name']?></font> 查询结果</span>您所在的位置：<a href="/">首页</a> >> <a href="/supply/">供应</a><?php
if($l_row[cat_id]>0){
 $o_rs=mysql_query("select id,cat_id,cat_name from catalog where id='$l_row[cat_id]'");
 $o_row=mysql_fetch_array($o_rs);
 $t_rs2=mysql_query("select id,cat_name from catalog where id='$o_row[cat_id]'");
 $t_row2=mysql_fetch_array($t_rs2);
 if($t_row2[id]){?> >> <a href="/supply-catalog/<?=$t_row2[id]?>.html"><?=$t_row2[cat_name]?></a><?php }else{?> >> <a href="/supply-catalog/<?=$o_row[id]?>.html"><?=$o_row[cat_name]?></a><?php }if($o_row[cat_id]>0){?> >> <a href="/supply-list/<?=$o_row[id]?>/1.html"><?=$o_row[cat_name]?></a><?php }}?> >> <a href="/supply-list/<?=$_GET[id]?>/1.html"><?=$l_row['cat_name']?></a> >> <?=$c_row[city_name]?><?=$l_row['cat_name']?></div>
<div class="onl"></div>
</div>
<div class="w960 topside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>

<div id="mian" class="topside6  sideyellow backyellow">
<div class="title1 size14 b"><?=$l_row['cat_name']?></div>
<div class="Class backwhite sideyellow1">
<ul>
<?php
$l_rs1=mysql_query("select id,cat_name,p_num from catalog where cat_id='".$_GET['id']."' order by id asc");
$l_rs2=mysql_query("select count(id) from catalog where cat_id='".$_GET['id']."'");
$num=mysql_result($l_rs2,0);
mysql_free_result($l_rs2);
while($l_row1=mysql_fetch_array($l_rs1)){
?>
<li><a href="/supply-city/<?=$l_row1[id]?>-<?=$_GET[tid]?>/1.html"><?=$l_row1[cat_name]?></a>(<?=$l_row1[p_num]?>)</li>
<?php }
if(!$num){?>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-2924453545159453";
/* 728x90, 创建于 11-3-13 */
google_ad_slot = "7786933515";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<?php }?>
</ul>
<div class="onl"></div>
</div>
</div>

<div id="mian" class="topside6" style="margin-bottom:10px; margin-top:10px;">
<script type="text/javascript">
/*960*80，创建于2013-7-4*/
var cpro_id = "u1313438";
</script>
<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
</div>

<?php if($num){?>
<div id="mian" class="topside6">
<script type="text/javascript"><!--
google_ad_client = "pub-2924453545159453";
/* 728x90, 创建于 10-12-28 */
google_ad_slot = "0069335756";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<?php }?>

<div id="mian" class="topside6">
  <div class="onl"></div>
<div class="leftmain">
<div>
<DIV class="zzb3 side">
<DIV style="width:120px;float:left;height:25px;line-height: 25px;" align="center">图片</DIV>
<DIV style="width:276px;float:left;height:25px;line-height: 25px;" align="center">供应产品信息</DIV>
<DIV style="width:100px;float:left;height:25px;line-height: 25px;" align="center">
</DIV>
<DIV style="width:90px;float:left;height:25px;line-height: 25px;" align="center">单价/起定量</DIV>
<DIV style="width:80px;float:left;height:25px;line-height: 25px;" align="center">会员类型</DIV>
</DIV>
<?php


$rs=mysql_query("select product.id,product.p_title,product.picture,product.p_addtime,product.p_info,product.p_price,product.p_minorder,member.m_type,member.m_user,member.m_cname,member.pro,member.city from product inner join member on product.member_id=member.id where product.catalog_id$j=".$_GET['id']." and product.p_sh=1 ".$sqls." order by product.id desc limit ".($thepage-1)*$maxpage.",$maxpage");
while($row=mysql_fetch_array($rs)){
if($row[m_type]==6){
   $m_url="http://$row[m_user].sandib2b.cn/";
   $m_url2="http://$row[m_user].sandib2b.cn/contact.htm";
}else{
   $m_url="/cn/template/$row[m_user]/";
   $m_url2="/cn/template/$row[m_user]/contact.html";
}
?>
<? //=imgstr("http://www.sandib2b.cn/upfile/$row[picture]","","")?>
<DIV class=zzb4 id=Info6197>
<DIV class=zzb4-2>
<a href="/supply/<?=$row['id']?>.html" target="_blank">
<?php if(trim($row[picture])){?>
<img src="/upfile/<?=$row[picture]?>" alt="<?=$row[p_title]?>" border="0" width="91" height="83"/>
<?php }else{?>
<img src="/images/prono88.gif" width=91 height=83 border="0" />
<?php }?></a></DIV>
<DIV class=zzb4-3>
<DIV class=zzb4-3-1><a href="/supply/<?=$row['id']?>.html" target="_blank"><?=mb_substr($row[p_title],0,16,'utf-8')?></a><SPAN 
style="FONT-WEIGHT: normal" class="size10 fontgray"><?=date("Y-m-d",strtotime($row[p_addtime]))?></SPAN></DIV>
<DIV class=zzb4-3-Time></DIV>
<DIV class=zzb4-3-2><?=mb_substr(strip_tags($row[p_info]),0,50,'utf-8')?></DIV>
<DIV class=zzb4-3-3>
<DIV style="FLOAT: left;font-weight: lighter;"><A href="<?=$m_url?>" target=_blank><?=$row['m_cname']?></A> </DIV>
<DIV style="FLOAT: right; COLOR: #999999;font-weight: lighter;">[<?=$row[pro]?>-<?=$row['city']?>] </DIV></DIV></DIV>
<DIV class=zzb5>
  <DIV style="TEXT-ALIGN: center" class="fontred size14 b"><?=$row[p_price]?></DIV>
<div class="size11 fontgray"><?=$row[p_minorder]?></div></DIV>
<DIV class=zzb52>
<div style="COLOR: #999999;font-weight: lighter;">
<?php if($row[m_type]==6){?>
<a href="<?=$m_url?>certificate.htm" target="_blank"><img src="/images/member1.gif"/ border="0"></a><?php }?></div>
</DIV>
<DIV class=zzb53>
  <div style="margin-top: 6px;"><a href="<?=$m_url2?>" target="_blank"><img src="/images/list01.gif" border="0" /></a></div>
  <div style="margin-top: 6px;"><a href="/supply/<?=$row['id']?>.html" target="_blank"><img src="/images/list02.gif" border="0" /></a></div>
</DIV>
<div class="onl"></div>
</DIV>
<?php }
$rs2=mysql_query("select count(id) from product  where p_sh=1 and catalog_id$j='$_GET[id]' ".$sqls);
$totalrecord=mysql_result($rs2,0); 
$totalpage=ceil($totalrecord/$maxpage);
mysql_free_result($rs2);
?>
</div>
<div class="onl"></div>
<div class="page">
<div class="pageleft">
<ul>
<?php pages($thepage,$totalpage,$maxpage,4);?>
</ul>
</div>
<div class="pageright">
<form name="pageform" method="post" action="" onSubmit="return onCheckPage()"> 
共<?=$totalpage?>页　到
<input type="text" name="page" class="input-txt" size="5" maxlength="5">页
<input type="submit" value="确定" class="but">
</form>
<script language="javascript"> 
function onCheckPage(){
var page = parseInt(document.pageform.page.value); 
if(isNaN(page)){
alert("请输入数字(1,<?=$totalpage?>)");
return false; 
}
if(page<=0){
page =1; 
}
if(page ><?=$totalpage?>){
page=<?=$totalpage?>;
}
if(page>1){
document.pageform.action = "/supply-city/<?=$_GET[id]?>-<?=$_GET[tid]?>/"+page+".html"; 
}else{
document.pageform.action = "/supply-city/<?=$_GET[id]?>-<?=$_GET[tid]?>/1.html"; 
}
return true;
}
</script>
  </div>
<div class="onl"></div>
</div>
<!--page end-->
</div>
<div class="rightmain">
  <div class="right side">
  <div class="title b">黄金展位供应商</div>
  
  <div style="width:180px;" align="center">
<?php 
$a_rs=mysql_query("select ad_url,ad_picture from adwords where type_id=3 and ad_id='".$_GET['id']."' and is_ok=1 order by id asc");
$a_rs2=mysql_query("select count(id) from adwords where type_id=3 and ad_id='".$_GET['id']."' and is_ok=1 order by id asc");
$num=mysql_result($a_rs2,0);
mysql_free_result($a_rs2);
while($a_row=mysql_fetch_array($a_rs)){?>
<?php if($a_row[ad_url]){?><a href="<?=$a_row[ad_url]?>" target="_blank"><?php }?><img src="/upfile/<?=$a_row[ad_picture]?>" width="176" height="116" border="0" /><?php if($a_row[ad_url]){?></a>
<?php }?>
<?php }
if(5-$num>0){
for($i=0;$i<5-$num;$i++){
?>
	<img src="/ad/supply-list/rad_<?=$i+1?>.gif" width="176" height="116" />
	<hr size=1 color="#cccccc"/>
<?php }}?>
	</div>
  <div style="width:180px;" align="center"><script type="text/javascript"> /*160*600，创建于2010-8-4*/ var cpro_id = 'u136291';</script>
<script type="text/javascript" src="http://cpro.baidu.com/cpro/ui/c.js"></script>
</div>
  </div>
</div>
<div class="onl"></div>
</div>

<div id="mian" class="topside6  sideyellow backyellow">
<div class="title1 size14 b" style="color:#FF0000;">
为了节省您的时间，您在求购过程中没找到合适产品或供应商，请发布紧急求购产品信息。让商家联系您。&nbsp;&nbsp;<a href="/caigou/" target="_blank">立即发布紧急求购</a></div>
</div>

<div id="mian" class="topside6  sideyellow backyellow">
<div class="title1 size14 b">
<ul>
<?php
 $rs=mysql_query("select id,city_name from city where city_id='$c_row[city_id]' order by id asc");
 while($row=mysql_fetch_array($rs)){
?>
<li style="width:60px; float:left;"><a href="/supply-city/<?=$_GET[id]?>-<?=$row['id']?>/1.html" target="_blank"><font color="#0033CC"><?=$row[city_name]?></font></a></li>
<?php }?><li style="width:60px; float:left;"><a href="/supply-city/cid-<?=$_GET[id]?>.html" target="_blank">更多</a></li>
</ul>
</div>
<div class="onl"></div>
</div>

<div class="w960 topside20 downside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<?php include("../inc/foot.php");?>
</body>
</html>

<script language="javascript">
function $(id){
return document.getElementById(id);
}
function listfoot(){
if($("subject").value==""){
alert("请输入您要搜索的关键字");
$("subject").focus();
return false;
}
}
</script>
<script type="text/javascript">/*120*270，创建于2010-12-18*/ var cpro_id = 'u319758';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>